import {
  request
} from "./request"
// 
export const StoreTypeConfig = {
  good: 1,//普通商品
  gemoSelect: 2, //gemo甄选
  buyback: 3, //复购派对商品
}

export const GoodTypeConfig = {
  good: '10', //实物
  virtual: '20',
  spa: '30'
}

export const goodsInfoList = (params) => {
  return request({
    url: '/system/goodsInfo/list',
    data: params,
    method: "GET"
  })
}

export const exchangeGoodReq = (params) => {
  return request({
    url: '/system/gemo/order/integralExchange',
    data: params,
    method: "POST"
  })
}

export const getExchangeListReq = () => {
  return request({
    url: '/system/gemo/order/list',
    method: "POST"
  })
}

/**
 * B端商户相关
 */

// 获取验证码
export const sendphonecreatecode = (params) => {
  return request({
    url: '/system/gemouser/sendphonecreatecode',
    data: params,
    method: "POST"
  })
}
// 商铺登陆
export const checkOutBooking = (params) => {
  return request({
    url: '/system/gemo/shop/checkOutBooking',
    data: params,
    method: "POST"
  })
}

//预约列表数据
export const getBookingInfoList = (params) => {
  return request({
    url: '/system/gemo/shop/getBookingInfoList',
    data: params,
    method: "POST"
  })
}

// 积分明细列表
export const getScoreList = (params) => {
  return request({
    url: '/system/gemouser/getScoreList',
    data: params,
    method: "GET"
  })
}

// 获取门店首页信息
export const getShopIndex = (params) => {
  return request({
    url: '/system/gemo/shop/index',
    data: params,
    method: "POST"
  })
}

// 门店小程序登录
export const shopmalogin = (params) => {
  return request({
    url: '/system/gemouser/shopmalogin',
    data: params,
    method: "POST"
  })
}

//商品收藏
export const goodscollect = (params) => {
  return request({
    url: '/system/goodsInfo/goodscollect',
    data: params,
    method: "POST"
  })
}

// 获取用户预约信息id查询预约详情
export const getBookingInfo = (params) => {
  return request({
    url: '/system/gemo/shop/getBookingInfo/' + params.bookingId,
    data: params,
    method: "POST"
  })
}

export const checkShopAuth = (params) => {
  return request({
    url: '/system/gemouser/checkShopAuth',
    data: params,
    method: "POST"
  })
}

// 获取商品详情 /system/goodsInfo/{agiId}  
export const getGoodsInfo = (params) => {
  return request({
    url: '/system/goodsInfo/' + params,
    method: "GET"
  })
}

// 门店审核记录
export const shopAuditList = (params) => {
  return request({
    url: '/system/brandShopAudit/shop-audit-list',
    method: "GET"
  })
}

// 更新门店信息
export const shopChangeApply = (params) => {
  return request({
    url: '/system/brandShopAudit/shop-change-apply',
    data: params,
    method: "POST"
  })
}

// 商品标签接口
export const goodsTagList = (params) => {
  return request({
    url: '/system/goodsTag/list',
    data: params,
    method: "GET",
  })
}


//商家首页数据
export const ShopIndexConfigs = [
  {
    icon: 'icon-1.png',
    title: "累计预约体验",
    num: 9999
  },
  {
    icon: 'icon-2.png',
    title: "累计核销",
    num: 666
  },
  {
    icon: 'icon-3.png',
    title: "今日核销",
    num: 9
  },
]